//
//  MenuBoard.m
//  LabanBrowser
//
//  Created by Xh2 on 3/26/13.
//  Copyright (c) 2013 VNG. All rights reserved.
//

#import "MenuBoard.h"
#import "TextButton.h"
#import "StaticVariables.h"
@implementation MenuBoard
double kCellSize=65;
double kMenuItemInset=5;

- (id)initWithFrame:(CGRect)frame
{
    UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
    //[flowLayout setScrollDirection:UICollectionViewScrollDirectionHorizontal];
    [flowLayout setItemSize:CGSizeMake(kCellSize, kCellSize)];
    [flowLayout setMinimumInteritemSpacing:2];
    [flowLayout setMinimumLineSpacing:2];
    [flowLayout setSectionInset:UIEdgeInsetsMake(kMenuItemInset, kMenuItemInset, kMenuItemInset, kMenuItemInset)];
    self = [super initWithFrame:frame collectionViewLayout:flowLayout];
    if (self) {
        // Initialization code
        self.backgroundColor=[UIColor clearColor];
        
        [self setBounces:NO];
        [self setScrollsToTop:NO];
        [self registerClass:[TextButton class] forCellWithReuseIdentifier:@"menuBoard"];
        //[self registerNib:[UINib nibWithNibName:@"DialerItem" bundle:nil] forCellWithReuseIdentifier:kCellReuseID];
    }
    return self;
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
